<!DOCTYPE html>
<html>
<head>
<title>征信平台api</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap th:href="@{/css/bootstrap.css}"-->
<!-- href="../resource/bootstrap-3.3.7-dist/css/bootstrap.min.css" -->

<script src="resource/jquery/jquery-3.2.1.min.js"></script>
<script src="resource/jquery/jquery.form.js"></script>
<script src="resource/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>

<link href="resource/bootstrap-3.3.7-dist/css/bootstrap.css"
	rel="stylesheet" media="screen">
<link href="resource/bootstrap-3.3.7-dist/css/bootstrap.min.css"
	rel="stylesheet" media="screen">
<!-- HTML5 Shim 和 Respond.js 用于让 IE8 支持 HTML5元素和媒体查询 -->
<!-- 注意： 如果通过 file://  引入 Respond.js 文件，则该文件无法起效果 -->
<!--[if lt IE 9]>
         <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
         <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
      <![endif]-->
<style type="text/css">
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width:100%;
}
body {
    
}

#wrapper {
    margin: 0 auto;
    width: 300px;
    height: 100%;
    padding: 15px 0;

    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}
#content {
    background-color: #C9E6FF;
    min-height: 100%;
}
#padding-bottom {
    height: 15px;
}
</style>
</head>
<body>
	 <div class="page-header">
		<h3>
			征信平台api<small>--服务运行中 </small>
		</h3>
	</div>
	 <div>
	 	<a id="a1" class="btn btn-lg btn-primary btn-block submit" style="background-color: #3f51b5;">点击测试获取token</a>
	 </div>
	 <br/>
	 <br/>
	 <div>
	 	<a id="a2" href="swagger-ui.html" class="btn btn-lg btn-primary btn-block submit" style="background-color: #3f51b5;">查看接口文档</a>
	 </div>
</body>
<script type="text/javascript">
$(document).ready(
	function(){
		$("#a1").bind("click",function(){
			submitLoginForm();
		});
	}
);

function submitLoginForm(){
	 /* $.post("doLogin",{username:"abc",password:"123"},function (){
		alert('abc');
	}); */
	var jsonA = {"data": {"vendor_key": "abc","vendor_secret":"abcdefg"}};
	$.ajax({
		url:'api/getToken',//http://39.108.247.79:8012/api/getToken
		type:'post',
		data: JSON.stringify(jsonA),
		dataType:'json',
		contentType: 'application/json;charset=utf-8',
		success:function(msg){
			alert(msg.data.code);
		}
	});
	
	/* $.post("http://127.0.0.1:8012/api/getToken",{username:"abc",password:"123"},function (){
		alert('abc');
	}); */
}
</script>
</html>